-- BluePayAgent
-- Created by chenx 2016.5.29
-- bluepay 支付代理

module("BluePayAgent", package.seeall);

function init()
    print('BluePayAgent init\n');
end

----------------------
-- mycard购买商品
-- @param sku 商品库存标识
function buyPurchase(sku, price)
    local serverId = getCurrentServerId();
    local account  = getGaming3rdAccount() or "empty3rdAccount";
    local platform = PUBLISH_PLATFORM;

    --print("mycardagent buyPurchase sku: %s, account : %s\n", sku, account);
    
    price = price or 30;
    -- 通过 mycard 支付购买商品
    callJavaFunc("buyPurchaseViaBluePay", {sku, tostring(price), account, serverId, platform},
        "(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;)V");
end

-- @param sku 商品库存标识
function batchQuerySkuPrice(skuStr, accountStr)
end
